from PyQt5.QtWidgets import  QWidget
from PyQt5.QtCore import Qt

from GUI.Window.Editor.Confirm.confirmWindow import Ui_ConfirmEditor


class ConfirmEditor(QWidget, Ui_ConfirmEditor):

    def __init__(self, parent):
        super().__init__(parent)
        self.hide()
        self.initUI(parent)

    def initUI(self, parent):
        self.setupUi(self)
        # 定位
        self.setWindowFlags(Qt.FramelessWindowHint)
        self.setGeometry(0, 0, parent.geometry().width(), parent.geometry().height())
        # 信号
        self.LabelConfirm.mousePressEvent = self.__confirm
        self.LabelCancel.mousePressEvent = self.__cancel
        # self.pushButton_OK.clicked.connect(self.__confirmSlot)
        # self.pushButton_Cancel.clicked.connect(self.__cancelSlot)

    def confirmAction(self):
        pass

    def cancelAction(self):
        pass

    def __confirm(self, event):
        self.confirmAction()

    def __cancel(self, event):
        self.cancelAction()
